<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let set = new Set(['red', 'green', 'blue']);
        // for (let item of set.keys()) {
        //     console.log(item);
        // }
        // for (let item of set.values()) {
        //     console.log(item);
        // }
        // for (let item of set.entries()) {
        //     console.log(item);
        // }
        // for (let x of set) {
        //     console.log(x);
        // }

        // let set = new Set([1, 4, 9]);
        // set.forEach((value, key) => console.log(key + ':' + value))

        // let arr = [3, 5, 2, 2, 5, 5];
        // console.log([...new Set(arr)]);

        let set = new Set([1, 2, 3, 4, 5]);
        // set = new Set([...set].map(x => x * 2));
        set = new Set([...set].filter(x => (x % 2) == 0));
        console.log(set);
    </script>
</body>
</html>